using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace CSF.Communications.Sdp.ServiceLogic.Utilities
{
    public class ConfigurationProvider
    {
        private static ConfigurationProvider configProvider = null;
        private static object innerObject = new object();
        private SLConfig slConfigMembers = null;

        private ConfigurationProvider()
        {
            slConfigMembers = new SLConfig();

            slConfigMembers.DbConn = System.Configuration.ConfigurationSettings.AppSettings.Get("dbConnection");

        }

        public static ConfigurationProvider GetInstance()
        {
            lock (innerObject)
            {
                if (configProvider == null)
                {
                    configProvider = new ConfigurationProvider();
                }
            }

            return configProvider;
        }

        public SLConfig SL
        {
            get
            {
                return slConfigMembers;
            }
        }
    }


    public class SLConfig
    {
        #region Members
        private String dbConnString = String.Empty;
        #endregion

        #region Properties
        public String DbConn
        {
            get
            {
                return dbConnString;
            }
            set
            {
                value = dbConnString;
            }
        }
        #endregion
    }
}
